package com.airy.highSpeed.service.impl;


import com.airy.highSpeed.dao.mysql.StationparentDao;
import com.airy.highSpeed.dao.mysql.TrHourFlowDao;
import com.airy.highSpeed.entity.StationparentEntity;
import com.airy.highSpeed.entity.TrHourFlowEntity;
import com.airy.highSpeed.service.StationparentService;
import com.airy.highSpeed.utils.PageUtils;
import com.airy.highSpeed.utils.Query;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("stationparentService")
public class StationparentServiceImpl extends ServiceImpl<StationparentDao, StationparentEntity> implements StationparentService {

    @Autowired
    StationparentDao stationparentDao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<StationparentEntity> page = this.page(
                new Query<StationparentEntity>().getPage(params),
                new QueryWrapper<StationparentEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<StationparentEntity> findAll() {
        return stationparentDao.findAll();
    }
}